********** Beginning of RDML commands **********
FUNCTION   OPTIONS(*DIRECT)
**********
DEFINE     FIELD(#JSMSTS) TYPE(*CHAR) LENGTH(20)
DEFINE     FIELD(#JSMCMD) TYPE(*CHAR) LENGTH(255)
DEFINE     FIELD(#JSMMSG) TYPE(*CHAR) LENGTH(255)
DEFINE     FIELD(#DTE) TYPE(*CHAR) LENGTH(15)
DEFINE     FIELD(#VAL) TYPE(*DEC) LENGTH(15) DECIMALS(3)
**********
DEF_LIST   NAME(#WRKLST) FIELDS((#EMPNO) (#GIVENAME) (#SURNAME) (#DTE) (#VAL)) TYPE(*WORKING)
**********
USE        BUILTIN(JSM_OPEN) WITH_ARGS('LOCALHOST:7560') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
CHANGE     FIELD(#JSMCMD) TO('SERVICE_LOAD SERVICE(EXCELSERVICE) TRACE(*YES)')
USE        BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
CLR_LIST   NAMED(#WRKLST)
**********
CHANGE     FIELD(#JSMCMD) TO('''OPEN FILE(test-input/excel-data.xlsx)''')
USE        BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_COMMAND) WITH_ARGS('SET OBJECT(*CONTEXT) SHEET(SHEET1)') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
CHANGE     FIELD(#JSMCMD) TO('READ R1C1(10,3) ROWCOUNT(10) IGNORE(*EMPTY) SCALE(5)
           SERVICE_LIST(EMPNO,GIVENAME,SURNAME,DTE,VAL)')
USE        BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG #WRKLST)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_COMMAND) WITH_ARGS('CLOSE') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_CLOSE) TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
SELECTLIST NAMED(#WRKLST)
DISPLAY    FIELDS((#EMPNO) (#GIVENAME) (#SURNAME) (#DTE) (#VAL))
ENDSELECT
**********
********** SUB ROUTINES
**********
SUBROUTINE NAME(CHECK) PARMS((#JSMSTS *RECEIVED) (#JSMMSG *RECEIVED))
**********
IF         COND('#JSMSTS *NE OK')
DISPLAY    FIELDS((#JSMSTS) (#JSMMSG))
**********
USE        BUILTIN(JSM_CLOSE) TO_GET(#JSMSTS #JSMMSG)
**********
MENU       MSGTXT('Java service error has occured')
**********
ENDIF
**********
ENDROUTINE
********** End of RDML commands **********